package main

import "fmt"

// Author : CSR丶WARRIOR
// Time ： 2020/10/15  10:22
// TOOLS : GoLand
// FILENAME : structPointer.go
// STATEMENT: 指针与结构体
type Car struct {
	brand   string
	price   float64
	country string
}

func main() {
	var car Car = Car{
		brand:   "bmw",
		price:   55.6,
		country: "German",
	}
	structPointer(&car)
	fmt.Println(car) //{benz 55.6 German}
}
func structPointer(car *Car) {
	fmt.Println(car)
	//修改字段属性
	car.brand = "benz"
}
